package com.doeis.uwork.entity;

import java.sql.Timestamp;

import com.voland.core.db.Entity;
import com.voland.core.validator.NotNull;
import com.voland.core.annotation.*;

@Table(name="share")
public class Share extends Entity {

	private String id;
	private String user_id;
	private String switchboard_id;
	@NotNull(message="共享类型不能为空")
	private Integer source_type;
	@NotNull(message="共享资源不能为空")
	private String source_id;
	@NotNull(message="共享名称不能为空")
	private String name;
	private String content;
	@NotNull(message="共享范围不能为空")
	private Integer scope;
	private String item_id;
	private Integer status;
	private Timestamp updated_at;
	private String descrip;
	
	private String sharer;//组名称+用户名称
	private String emails;
	//private String pwd;
	private String productName;
	private Boolean is_from_vps;
	private String vps_key;
	private String head_pic;//图片地址url
	
	@Associate
	private String methodName;	
	@Associate
	private Item shareItem;
	@Associate
	private Boolean show_formula;
	@Associate
	private Boolean show_note;

	
	public String getHead_pic() {
		return head_pic;
	}
	public void setHead_pic(String head_pic) {
		this.head_pic = head_pic;
	}
	public Boolean getShow_formula() {
		return show_formula;
	}
	public void setShow_formula(Boolean show_formula) {
		this.show_formula = show_formula;
	}
	public String getId(){
		return id;
	}
	public void setId(String id){
		this.id = id;
	}

	public String getUser_id(){
		return user_id;
	}
	public void setUser_id(String user_id){
		this.user_id = user_id;
	}

	public String getSwitchboard_id(){
		return switchboard_id;
	}
	public void setSwitchboard_id(String switchboard_id){
		this.switchboard_id = switchboard_id;
	}

	public Integer getSource_type(){
		return source_type;
	}
	public void setSource_type(Integer source_type){
		this.source_type = source_type;
	}

	public String getSource_id(){
		return source_id;
	}
	public void setSource_id(String source_id){
		this.source_id = source_id;
	}

	public String getName(){
		return name;
	}
	public void setName(String name){
		this.name = name;
	}

	public String getContent(){
		return content;
	}
	public void setContent(String content){
		this.content = content;
	}

	public Integer getScope(){
		return scope;
	}
	public void setScope(Integer scope){
		this.scope = scope;
	}

	public Integer getStatus(){
		return status;
	}
	public void setStatus(Integer status){
		this.status = status;
	}

	public Timestamp getUpdated_at(){
		return updated_at;
	}
	public void setUpdated_at(Timestamp updated_at){
		this.updated_at = updated_at;
	}

	public String getSharer() {
		return sharer;
	}
	public void setSharer(String sharer) {
		this.sharer = sharer;
	}
	
	public String getItem_id() {
		return item_id;
	}
	public void setItem_id(String item_id) {
		this.item_id = item_id;
	}
	
	public Item getShareItem() {
		return shareItem;
	}
	public void setShareItem(Item shareItem) {
		this.shareItem = shareItem;
	}
		
	public String getDescrip() {
		return descrip;
	}
	public void setDescrip(String descrip) {
		this.descrip = descrip;
	}
		
	public String getMethodName() {
		return methodName;
	}
	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}
	
	public Boolean getIs_from_vps() {
		return is_from_vps;
	}
	public void setIs_from_vps(Boolean is_from_vps) {
		this.is_from_vps = is_from_vps;
	}
	public String getVps_key() {
		return vps_key;
	}
	public void setVps_key(String vps_key) {
		this.vps_key = vps_key;
	}
	
	public String getEmails() {
		return emails;
	}
	public void setEmails(String emails) {
		this.emails = emails;
	}
//	public String getPwd() {
//		return pwd;
//	}
//	public void setPwd(String pwd) {
//		this.pwd = pwd;
//	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
		
	public Boolean getShow_note() {
		return show_note;
	}
	public void setShow_note(Boolean show_note) {
		this.show_note = show_note;
	}
	@Override
	public String toString(){
		return "Share ["+
			"id="+id+", user_id="+user_id+", "+
			"switchboard_id="+switchboard_id+", source_type="+source_type+", "+
			"source_id="+source_id+", name="+name+", "+
			"content="+content+", scope="+scope+", "+
			"status="+status+", updated_at="+updated_at+", "+
			"toString()="+super.toString() +"]";
	}
	
}